# coding:utf8
import findspark

findspark.init()
from pyspark import SparkContext, SparkConf

if __name__ == '__main__':
    conf = SparkConf().setAppName("test").setMaster("local[*]")
    sc = SparkContext(conf=conf)

    rdd = sc.parallelize([1, 2, 3, 4, 5])
    for i in rdd.toLocalIterator():
        print(i)
    print(rdd.collect())
